<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <form id="my-form" class="am-form tpl-form-line-form" enctype="multipart/form-data" method="post">
                    <div class="widget-body">
                        <fieldset>
                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl">修改试卷</div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">试卷标题 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="category[bq_title]"  value="{{$info.bq_title}}" required>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">试卷价格 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="category[bq_price]"  value="{{$info.bq_price}}" required>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">所属分类 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <select name="category[bq_type2]"
                                            data-am-selected="{searchBox: 1, btnSize: 'sm'}">
                                        <?php if (isset($list)): foreach ($list as $first): ?>
                                            <option value="<?= $first['qt_id'] ?>" <?php if($info['bq_type2']==$first['qt_id']) {echo 'selected';} ?>>
                                                <?= $first['qt_name'] ?></option>
                                        <?php endforeach; endif; ?>
                                    </select>
                                </div>
                            </div>
                            <div class="am-form-group am-padding-top">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">试卷描述 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <textarea  name="category[bq_des]" >{{$info.bq_des}}</textarea>
                                </div>
                            </div>

                            

                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">难易程度 </label>
                                <div class="am-u-sm-9 am-u-end">
                                <label class="am-radio-inline">
                                    <input type="radio" name="category[bq_easy]" value="1" <?php if($info['bq_easy']==1) {echo 'checked';} ?>> 简单（50道题）
                                </label>
                                <label class="am-radio-inline">
                                    <input type="radio" name="category[bq_easy]" value="2" <?php if($info['bq_easy']==2) {echo 'checked';} ?>> 中等难度（20道题）
                                </label>
                                <label class="am-radio-inline">
                                    <input type="radio" name="category[bq_easy]" value="3" <?php if($info['bq_easy']==3) {echo 'checked';} ?>> 高难度（10道题）
                                </label>


                                </div>
                            </div>
                            
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">分类排序 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="number" class="tpl-form-input" name="category[bq_sort]"
                                           value="{{$info.bq_sort}}" required>
                                    <small>数字越小越靠前</small>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">状态 </label>
                                <div class="am-u-sm-9 am-u-end">
                                <label class="am-radio-inline">
                                    <input type="radio" name="category[bq_show]" value="1" <?php if($info['bq_show']==1) {echo 'checked';} ?>> 显示
                                </label>
                                <label class="am-radio-inline">
                                    <input type="radio" name="category[bq_show]" value="2" <?php if($info['bq_show']==2) {echo 'checked';} ?>> 隐藏
                                </label>
                                </div>
                            </div>
<!--                            <div class="am-form-group">-->
<!--                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">平均得分 </label>-->
<!--                                <div class="am-u-sm-9 am-u-end">-->
<!--                                    <input type="number" class="tpl-form-input" name="category[bq_score]"-->
<!--                                           value="{{$info.bq_score}}" required>-->
<!--                                    <small>回答该试卷的平均得分，如：87.22分  （系统自动计算）</small>-->
<!--                                </div>-->
<!--                            </div>-->
<!--                            <div class="am-form-group">-->
<!--                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">使用次数 </label>-->
<!--                                <div class="am-u-sm-9 am-u-end">-->
<!--                                    <input type="number" class="tpl-form-input" name="category[bq_usenum]"-->
<!--                                           value="{{$info.bq_usenum}}" required>-->
<!--                                    <small>该试卷被使用的次数 （系统自动计算）</small>-->
<!--                                </div>-->
<!--                            </div>-->

                            <div class="am-form-group">
                                <div class="am-u-sm-9 am-u-sm-push-3 am-margin-top-lg">
                                    <button type="submit" class="j-submit am-btn am-btn-secondary">提交
                                    </button>
                                </div>
                            </div>
                        </fieldset>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<!-- 图片文件列表模板 -->
{{include file="layouts/_template/tpl_file_item" /}}

<!-- 文件库弹窗 -->
{{include file="layouts/_template/file_library" /}}

<script>
    $(function () {

        // 选择图片
        $('.upload-file').selectImages({
            name: 'category[image_id]'
        });

        /**
         * 表单验证提交
         * @type {*}
         */
        $('#my-form').superForm();

    });
</script>
